<template>
  <div class="data-detail-box">
    <div class="data-detail-left">
      <div class="data-detail-title">
        {{ data.title }}
      </div>
      <div class="data-detail-img">
        <img style="width: 3.4rem; height: 3.4rem" :src="require('@/assets/images/' + data.img)" alt="" />
      </div>
    </div>
    <div class="data-detail-right">
      <span class="countRow fontcolor-blue" :style="{ color: data.color, fontSize: '30px' }">{{ data.value }}</span>
      <span class="unit">{{ data.tip }}</span>
    </div>
  </div>
</template>

<script>
export default {
  name: 'Detail',
  props: {
    data: {
      type: Object,
      default() {
        return {}
      },
    },
  },
  mounted() {},
}
</script>

<style lang="scss" scoped>
@mixin hk-flex {
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
}
.data-detail-box {
  width: 32%;
  padding: 20px !important;
  @include hk-flex;
  justify-content: space-between !important;
  align-items: flex-end !important;
  .data-detail-left {
    .data-detail-title {
      font-size: 16px;
    }
    .data-detail-img {
      margin-top: 20px;
      display: flex;
    }
  }
  .data-detail-right {
    span {
      display: block;
      text-align: center;
    }
  }
}
</style>
